<?
	$month = @$username['month'] == FALSE ? '' : @$username['month'];
	$day = @$username['day'] == FALSE ? '' : @$username['day'];
	$year = @$username['year'] == FALSE ? '' : @$username['year'];
	$lastname = @$lastname == FALSE ? '' : @$lastname;
?>
<div id="login-container">
	<?=$system_message?>
	<form action="<?=site_url('auth/forgot_password/'.$usertype);?>" class="form-horizontal" method="POST">
		<fieldset>
			<legend>Forgot Password > <?=$usertype === "student" ? "Student" : "Parent"?></legend>
			<div class="form-group">
				<label for="inputPassword" class="col-lg-2 control-label">E-mail</label>
				<div class="col-lg-10">
					<input type="email" name="email" class="form-control" value="<?=set_value('email');?>" placeholder="E-mail"  required>
				</div>
			</div>
			
			<div class="form-group">
				<label for="textArea" class="col-lg-2 control-label">Captcha Verification</label>
				<div class="col-lg-6">
					<div class="input-group input-group-lg">
					  <input type="text" name="captcha_text" class="form-control"  maxlength="8" placeholder="CAPTCHA Code" required>
					  <span style="padding:0;" class="input-group-addon"><?=$captcha_image;?></span>
					</div>
				</div>
			</div>
			<div class="form-group">
				<div class="col-lg-10 col-lg-offset-2">
					<input type="hidden" name="form_input_token" value="<?=$form_token;?>">
					<input type="submit" value="Submit" name="submit_forgot_password" class="btn btn-primary">
					<a href="<?=site_url('#'.$usertype)?>" class="btn btn-default">Cancel</a>
				</div>
			</div>
		</fieldset>
	</form>
</div>
<script>
$(document).ready(function(){
  $('#tab-navs a').click(function (e) {
        e.preventDefault();
        $(this).tab('show');
    });

    // store the currently selected tab in the hash value
    $("ul.nav-tabs > li > a").on("shown.bs.tab", function (e) {
        var id = $(e.target).attr("href").substr(1);
        window.location.hash = id;
    });

    // on load of the page: switch to the currently selected tab
    var hash = window.location.hash;
    $('#tab-navs a[href="' + hash + '"]').tab('show');
});
</script>